package com.ruoyi.statistic.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.statistic.mapper.WMonthExitWarehouseStatMapper;
import com.ruoyi.statistic.domain.WMonthExitWarehouseStat;
import com.ruoyi.statistic.service.IWMonthExitWarehouseStatService;

/**
 * 月出库量Service业务层处理
 * 
 * @author wzy
 * @date 2024-09-01 17:26:05
 */
@Service
public class WMonthExitWarehouseStatServiceImpl implements IWMonthExitWarehouseStatService 
{
    @Autowired
    private WMonthExitWarehouseStatMapper wMonthExitWarehouseStatMapper;

    /**
     * 查询月出库量
     * 
     * @param monthExitStatisticId 月出库量主键
     * @return 月出库量
     */
    @Override
    public WMonthExitWarehouseStat selectWMonthExitWarehouseStatByMonthExitStatisticId(Long monthExitStatisticId)
    {
        return wMonthExitWarehouseStatMapper.selectWMonthExitWarehouseStatByMonthExitStatisticId(monthExitStatisticId);
    }

    /**
     * 查询月出库量列表
     * 
     * @param wMonthExitWarehouseStat 月出库量
     * @return 月出库量
     */
    @Override
    public List<WMonthExitWarehouseStat> selectWMonthExitWarehouseStatList(WMonthExitWarehouseStat wMonthExitWarehouseStat)
    {
        return wMonthExitWarehouseStatMapper.selectWMonthExitWarehouseStatList(wMonthExitWarehouseStat);
    }

    /**
     * 新增月出库量
     * 
     * @param wMonthExitWarehouseStat 月出库量
     * @return 结果
     */
    @Override
    public int insertWMonthExitWarehouseStat(WMonthExitWarehouseStat wMonthExitWarehouseStat)
    {
        wMonthExitWarehouseStat.setCreateTime(DateUtils.getNowDate());
        return wMonthExitWarehouseStatMapper.insertWMonthExitWarehouseStat(wMonthExitWarehouseStat);
    }

    /**
     * 修改月出库量
     * 
     * @param wMonthExitWarehouseStat 月出库量
     * @return 结果
     */
    @Override
    public int updateWMonthExitWarehouseStat(WMonthExitWarehouseStat wMonthExitWarehouseStat)
    {
        wMonthExitWarehouseStat.setUpdateTime(DateUtils.getNowDate());
        return wMonthExitWarehouseStatMapper.updateWMonthExitWarehouseStat(wMonthExitWarehouseStat);
    }

    /**
     * 批量删除月出库量
     * 
     * @param monthExitStatisticIds 需要删除的月出库量主键
     * @return 结果
     */
    @Override
    public int deleteWMonthExitWarehouseStatByMonthExitStatisticIds(Long[] monthExitStatisticIds)
    {
        return wMonthExitWarehouseStatMapper.deleteWMonthExitWarehouseStatByMonthExitStatisticIds(monthExitStatisticIds);
    }

    /**
     * 删除月出库量信息
     * 
     * @param monthExitStatisticId 月出库量主键
     * @return 结果
     */
    @Override
    public int deleteWMonthExitWarehouseStatByMonthExitStatisticId(Long monthExitStatisticId)
    {
        return wMonthExitWarehouseStatMapper.deleteWMonthExitWarehouseStatByMonthExitStatisticId(monthExitStatisticId);
    }
}
